package org.cycuchy.hp.components.menu {
	
	import mx.containers.HBox;

	public class HPMenu extends HBox {
		
		public function HPMenu(items:Array) {
			super();
			setStyle("horizontalGap", 30);
			setStyle("verticalCenter", 0);
			setStyle("horizontalCenter", 0);
			//setStyle("left", 20);
			this.items = items;
		}
		
		private var items:Array = null;
		
		override protected function createChildren():void {
			super.createChildren();
			var button:HPMenuButton;
			for each (var item:Object in items) {
//				trace(item);
				button = new HPMenuButton();
				button.text1 = item.text1;
				button.text2 = item.text2;
				button.clickCallback = item.clickCallback;
				addChild(button);
			}
		}
			
	}
	
}